package com.are.inventario;


import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

@SuppressWarnings("rawtypes")
public class AdaptadorMarcas extends ArrayAdapter {
	private final Activity context;
	private final String[] datos;

	@SuppressWarnings("unchecked")
	AdaptadorMarcas(Activity context, String[] objects) {
		super(context, R.layout.marcas_item, objects);
		this.context = context;
		this.datos = objects;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		LayoutInflater inflater = context.getLayoutInflater();
		View item = inflater.inflate(R.layout.marcas_item, null);

		String actual = datos[position];
		TextView pais = (TextView) item.findViewById(R.id.lbMarca);
		pais.setText(actual);
		return (item);
	}
}